package com.fast.fastenjoy.base.web.tag.model;

import com.fast.fastenjoy.base.utils.StringExUtils;
import com.fast.fastenjoy.base.web.tag.BaseTag;
import com.fast.fastenjoy.base.web.tag.Tags;

/**
 * 验证码标签
 * @author chenliaohua
 *
 */
public class VerifyCodeTag extends BaseTag{

	private static final long serialVersionUID = 1324477263215294565L;
	
	private int width;				// 图片宽
	private int height;				// 图片高
	private int lineSize;			// 干扰线数量
	private int strSize;			// 随机产生字符数量

//	private RandomValidateCodeManager randomValidateCodeManager = ApplicationContextUtils.getBean(RandomValidateCodeManager.class);
	
	@Override
	public void doInitParam() {
	}
	
	@Override
	public void doTag() {
		String html = StringExUtils.$format(getTagTemplate(Tags.VERIFY_CODE_TAG), "id", id);
		html = getBaseTagHtml(html);
		System.out.println(html);
		writeHtml(html);
	}
	
	public int getWidth() {
		return width;
	}

	public void setWidth(int width) {
		this.width = width;
	}

	public int getHeight() {
		return height;
	}

	public void setHeight(int height) {
		this.height = height;
	}

	public int getLineSize() {
		return lineSize;
	}

	public void setLineSize(int lineSize) {
		this.lineSize = lineSize;
	}

	public int getStrSize() {
		return strSize;
	}

	public void setStrSize(int strSize) {
		this.strSize = strSize;
	}

}
